{% extends 'base_user.html' %}
{% load static %}

{% block ext_css %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static 'axf/user/css/register.css' %}">
{% endblock %}

{% block ext_js %}
    {{ block.super }}
    <script type="text/javascript" src="{% static 'axf/user/js/register.js' %}"></script>
{% endblock %}

{% block content %}
    <div class="container">
        <form method="post" action="{% url 'app:register' %}" enctype="multipart/form-data" onsubmit="return checkRegister()">
            {% csrf_token %}
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" required
                       minlength="6" maxlength="32">
            </div>
            <div id="username_check_tips"></div>
            <div class="form-group">
                <label for="email">邮箱</label>
                <input type="email" class="form-control" id="email" name="email" placeholder="请输入邮箱" required>
            </div>
            <div id="email_check_tips"></div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required
                       minlength="6" maxlength="16">
            </div>
            <div class="form-group">
                <label for="confirm_password">确认密码</label>
                <input type="password" class="form-control" id="confirm_password" name="confirm_password"
                       placeholder="请再次输入密码" required minlength="6" maxlength="16">
            </div>
            <div id="password_check_tips"></div>
            <div class="form-group">
                <label for="icon">头像</label>
                <input type="file" id="icon" name="icon">
            </div>
            <button id="register" type="submit" class="btn btn-success btn-block">注册</button>
        </form>
    </div>
{% endblock %}